package lianxi.xl2;

public class FruitText {
    public static void main(String[] args) {
        Fruit fruit1 = new Fruit();
        fruit1.setName("葡萄");
        fruit1.setArea("吐鲁番");
        fruit1.setPrice(20);

        Fruit fruit2 = new Fruit();
        fruit2.setName("苹果");
        fruit2.setArea("烟台");
        fruit2.setPrice(100);

        Fruit fruit3 = new Fruit();
        fruit3.setName("荔枝");
        fruit3.setArea("广西");
        fruit3.setPrice(4.5);

        System.out.println(fruit1.getName() + "，产地：" + fruit1.getArea() + "，单价：" + fruit1.getPrice());
        System.out.println(fruit2.getName() + "，产地：" + fruit2.getArea() + "，单价：" + fruit2.getPrice());
        System.out.println(fruit3.getName() + "，产地：" + fruit3.getArea() + "，单价：" + fruit3.getPrice());
    }

}